<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The ZMQDevice class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="zmqpoll.remove.html">« ZMQPoll::remove</a></li>
      <li style="float: right;"><a href="zmqdevice.construct.html">ZMQDevice::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.zmq.html">0MQ消息系统</a></li>
    <li>The ZMQDevice class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.zmqdevice" class="reference">

 <h1 class="title">The ZMQDevice class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL zmq &gt;= 0.5.0)</p>


  <div class="section" id="zmqdevice.intro">
   <h2 class="title">简介</h2>
   <p class="para">

   </p>
  </div>


  <div class="section" id="zmqdevice.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">ZMQDevice</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="zmqdevice.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><a href="class.zmqsocket.html" class="type ZMQSocket">ZMQSocket</a></span> <code class="parameter">$frontend</code></span>, <span class="methodparam"><span class="type"><a href="class.zmqsocket.html" class="type ZMQSocket">ZMQSocket</a></span> <code class="parameter">$backend</code></span>, <span class="methodparam"><span class="type"><a href="class.zmqsocket.html" class="type ZMQSocket">ZMQSocket</a></span> <code class="parameter">$listener</code><span class="initializer"> = ?</span></span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="zmqdevice.getidletimeout.html" class="methodname">getIdleTimeout</a></span>(): <span class="type"><a href="class.zmqdevice.html" class="type ZMQDevice">ZMQDevice</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="zmqdevice.gettimertimeout.html" class="methodname">getTimerTimeout</a></span>(): <span class="type"><a href="class.zmqdevice.html" class="type ZMQDevice">ZMQDevice</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="zmqdevice.run.html" class="methodname">run</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="zmqdevice.setidlecallback.html" class="methodname">setIdleCallback</a></span>(<span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$cb_func</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$timeout</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$user_data</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="class.zmqdevice.html" class="type ZMQDevice">ZMQDevice</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="zmqdevice.setidletimeout.html" class="methodname">setIdleTimeout</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$timeout</code></span>): <span class="type"><a href="class.zmqdevice.html" class="type ZMQDevice">ZMQDevice</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="zmqdevice.settimercallback.html" class="methodname">setTimerCallback</a></span>(<span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$cb_func</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$timeout</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$user_data</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="class.zmqdevice.html" class="type ZMQDevice">ZMQDevice</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="zmqdevice.settimertimeout.html" class="methodname">setTimerTimeout</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$timeout</code></span>): <span class="type"><a href="class.zmqdevice.html" class="type ZMQDevice">ZMQDevice</a></span></div>

   }</div>


  </div>

 </div>

 

























































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="zmqdevice.construct.html">ZMQDevice::__construct</a> — Construct a new device</li><li><a href="zmqdevice.getidletimeout.html">ZMQDevice::getIdleTimeout</a> — Get the idle timeout</li><li><a href="zmqdevice.gettimertimeout.html">ZMQDevice::getTimerTimeout</a> — Get the timer timeout</li><li><a href="zmqdevice.run.html">ZMQDevice::run</a> — Run the new device</li><li><a href="zmqdevice.setidlecallback.html">ZMQDevice::setIdleCallback</a> — Set the idle callback function</li><li><a href="zmqdevice.setidletimeout.html">ZMQDevice::setIdleTimeout</a> — Set the idle timeout</li><li><a href="zmqdevice.settimercallback.html">ZMQDevice::setTimerCallback</a> — Set the timer callback function</li><li><a href="zmqdevice.settimertimeout.html">ZMQDevice::setTimerTimeout</a> — Set the timer timeout</li></ul>
</div>
</div></div></body></html>